body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #f0f0f0, #d9d9d9);
}

.container {
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 20px;
    background-color: #fff;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #333;
}

#board {
    display: grid;
    grid-template-columns: repeat(15, 40px);
    grid-template-rows: repeat(15, 40px);
    gap: 1px;
    margin: 20px auto;
    background-color: #cd8500; /* 木质棋盘颜色 */
    border: 2px solid #654321;
    border-radius: 10px;
    overflow: hidden;
}

.cell {
    width: 40px;
    height: 40px;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s;
}

.cell::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
}

.cell[data-col="14"]::before {
    border-right: none;
}

.cell[data-row="14"]::before {
    border-bottom: none;
}

.cell.x::before,
.cell.o::before {
    content: '';
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    position: absolute;
    animation: drop 0.5s ease forwards;
}

.cell.x::before {
    background-color: #ff6347; /* 红色 */
}

.cell.o::before {
    background-color: #4682b4; /* 蓝色 */
}

@keyframes drop {
    from {
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4682b4; /* 蓝色 */
    color: white;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: #365f7d;
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

@media (max-width: 600px) {
    #board {
        grid-template-columns: repeat(15, 5.5vw);
        grid-template-rows: repeat(15, 5.5vw);
        gap: 0.5px;
    }

    .cell {
        width: 5.5vw;
        height: 5.5vw;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .container {
        padding: 10px;
        margin: 10px;
    }
}